package com.meitianhui.convenitenbuy.module.mine.di;

import android.app.Activity;

import com.meitianhui.convenitenbuy.di.PerActivity;
import com.meitianhui.convenitenbuy.module.mine.presenter.AccountSecurityPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.AddOrNotifyAddressPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.CollectionPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.FadeBackPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.GuiderHistoryRequestPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.MessageDispitchPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.MessageGroupPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.MinePresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.QRCodePresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.ReceivingAddressPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.RecommenderPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.SearchGuiderStorePresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.SetPayPasswordPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.ShopGuiderPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.SystemNotifyPresenter;
import com.meitianhui.convenitenbuy.module.mine.presenter.UserInfoPresenter;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.AccountSecurityActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.AddOrNotifyAddressActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.CollectionActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.FadeBackActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.GuiderHistoryRequestActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.MessageDisPitchActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.MessageGroupActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.QRCodeActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.ReceivingAddressActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.RecommenderActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.SearchGuiderStoreActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.SetPayPasswordActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.ShopperGuideActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.SystemNotifyActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.activity.UserInfoActivity;
import com.meitianhui.convenitenbuy.module.mine.ui.fragment.MineFragment;

import dagger.Module;
import dagger.Provides;

/**
 * Created by amy on 2017/11/2.
 */
@Module
public class MineModule {
    private Activity mActivity;
    private MinePresenter mMinePresenter;
    private UserInfoPresenter mUserInfoPresenter;
    private QRCodePresenter mQrCodePresenter;
    private SetPayPasswordPresenter mSetPayPasswordPresenter;
    private AccountSecurityPresenter mAccountSecurityPresenter;
    private ReceivingAddressPresenter mReceivingAddressPresenter;
    private AddOrNotifyAddressPresenter mAddOrNotifyAddressPresenter;
    private RecommenderPresenter mRecommenderPresenter;
    private FadeBackPresenter mFadeBackPresenter;
    private CollectionPresenter mCollectionPresenter;
    private SystemNotifyPresenter mSystemNotifyPresenter;
    private MessageGroupPresenter mMessageGroupPresenter;
    private MessageDispitchPresenter mMessageDispitchPresenter;
    private ShopGuiderPresenter mShopGuiderPresenter;
    private GuiderHistoryRequestPresenter mGuiderHistoryRequestPresenter;
    private SearchGuiderStorePresenter mSearchGuiderStorePresenter;


    public MineModule(Activity activity) {
        this.mActivity = activity;
    }


    @Provides
    @PerActivity
    public Activity provideActivity() {
        return mActivity;
    }


//MineFragment start

    public MineModule(MineFragment activity) {
        mMinePresenter = new MinePresenter(activity, activity);
    }

    @Provides
    public MinePresenter provideMinePresenter() {
        return mMinePresenter;
    }

//MineFragment end


    //   UserInfoActivity start

    public MineModule(UserInfoActivity activity) {
        mUserInfoPresenter = new UserInfoPresenter(activity, activity);
    }

    @Provides

    public UserInfoPresenter provideUserInfoPresenter() {
        return mUserInfoPresenter;
    }

    //UserInfoActivity end


    //QrCodeActivity start
    public MineModule(QRCodeActivity activity) {
        mQrCodePresenter = new QRCodePresenter(activity, activity);
    }

    @Provides
    public QRCodePresenter provideQRCodePresenter() {
        return mQrCodePresenter;
    }
    //QrCodeActivity end

    //SetPayPasswordActivity start
    public MineModule(SetPayPasswordActivity activity) {
        mSetPayPasswordPresenter = new SetPayPasswordPresenter(activity, activity);
    }

    @Provides
    public SetPayPasswordPresenter provideSetPayPasswordPresenter() {
        return mSetPayPasswordPresenter;
    }
    //SetPayPasswordActivity end

    //AccountSecurityActivity start
    public MineModule(AccountSecurityActivity activity) {
        mAccountSecurityPresenter = new AccountSecurityPresenter(activity, activity);
    }

    @Provides
    public AccountSecurityPresenter provideAccountSecurityPresenter() {
        return mAccountSecurityPresenter;
    }
    //AccountSecurityActivity end

    //ReceivingAddressActivity start
    public MineModule(ReceivingAddressActivity activity) {
        mReceivingAddressPresenter = new ReceivingAddressPresenter(activity, activity);
    }

    @Provides
    public ReceivingAddressPresenter provideReceivingAddressPresenter() {
        return mReceivingAddressPresenter;
    }
    //ReceivingAddressActivity end


    //AddOrNotifyAddressActivity start
    public MineModule(AddOrNotifyAddressActivity activity) {
        mAddOrNotifyAddressPresenter = new AddOrNotifyAddressPresenter(activity, activity);
    }

    @Provides
    public AddOrNotifyAddressPresenter provideAddOrNotifyAddressPresenter() {
        return mAddOrNotifyAddressPresenter;
    }
    //AddOrNotifyAddressActivity end

    //RecommenderActivity start
    public MineModule(RecommenderActivity activity) {
        mRecommenderPresenter = new RecommenderPresenter(activity, activity);
    }

    @Provides
    public RecommenderPresenter provideRecommenderPresenter() {
        return mRecommenderPresenter;
    }
    //RecommenderActivity end

    //FadeBackActivity start
    public MineModule(FadeBackActivity activity) {
        mFadeBackPresenter = new FadeBackPresenter(activity, activity);
    }

    @Provides
    public FadeBackPresenter provideFadeBackPresenter() {
        return mFadeBackPresenter;
    }
    //FadeBackActivity end

    //CollectionActivity start
    public MineModule(CollectionActivity activity) {
        mCollectionPresenter = new CollectionPresenter(activity, activity);
    }

    @Provides
    public CollectionPresenter provideCollectionPresenter() {
        return mCollectionPresenter;
    }
    //CollectionActivity end


    //SystemNotifyActivity start
    public MineModule(SystemNotifyActivity activity) {
        mSystemNotifyPresenter = new SystemNotifyPresenter(activity, activity);
    }

    @Provides
    public SystemNotifyPresenter provideSystemNotifyPresenter() {
        return mSystemNotifyPresenter;
    }
    //SystemNotifyActivity end

    //MessageGroupActivity start
    public MineModule(MessageGroupActivity activity) {
        mMessageGroupPresenter = new MessageGroupPresenter(activity, activity);
    }

    @Provides
    public MessageGroupPresenter provideMessageGroupPresenter() {
        return mMessageGroupPresenter;
    }
    //MessageGroupActivity end

    //MessageDisPitchActivity start
    public MineModule(MessageDisPitchActivity activity) {
        mMessageDispitchPresenter = new MessageDispitchPresenter(activity, activity);
    }

    @Provides
    public MessageDispitchPresenter provideMessageDispitchPresenter() {
        return mMessageDispitchPresenter;
    }
    //MessageDisPitchActivity end

    //ShopperGuideActivity start
    public MineModule(ShopperGuideActivity activity) {
        mShopGuiderPresenter = new ShopGuiderPresenter(activity, activity);
    }

    @Provides
    public ShopGuiderPresenter provideShopGuiderPresenter() {
        return mShopGuiderPresenter;
    }
    //ShopperGuideActivity end


    //GuiderHistoryRequestActivity start
    public MineModule(GuiderHistoryRequestActivity activity) {
        mGuiderHistoryRequestPresenter = new GuiderHistoryRequestPresenter(activity, activity);
    }

    @Provides
    public GuiderHistoryRequestPresenter provideGuiderHistoryRequestPresenter() {
        return mGuiderHistoryRequestPresenter;
    }
    //GuiderHistoryRequestActivity end

    //SearchGuiderStoreActivity start
    public MineModule(SearchGuiderStoreActivity activity) {
        mSearchGuiderStorePresenter = new SearchGuiderStorePresenter(activity, activity);
    }

    @Provides
    public SearchGuiderStorePresenter provideSearchGuiderStorePresenter() {
        return mSearchGuiderStorePresenter;
    }
    //SearchGuiderStoreActivity end
}
